package com.yingluo.abacus.plantform.docs.consumer.feign;

import com.yingluo.abacus.plantform.docs.consumer.api.IFeign;
import com.yingluo.abacus.plantform.docs.consumer.utils.DocsConsumerUtils;
import com.yingluo.abacus.plantform.utils.PlantformUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
//http://localhost:8090/abacus/plantform/docs-consumer/consumer/feign
@RestController
public class FeignControler {
    private final static String PATH = DocsConsumerUtils.MOUDLE_PATH + "/consumer/feign";

    private static final Logger logger = LoggerFactory.getLogger(FeignControler.class);
    @Autowired
    IFeign feign;

    @RequestMapping(value = PlantformUtils.PROJECT_PATH +PATH, method = RequestMethod.GET)
    public String execute( ) {
        String str =null;
        try { 
            str = feign.execute( );
            logger.debug(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return str;
    }
}
